VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "CSort"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Implements IMSort

Public NumericSort As Boolean

Private Function IMSort_CompareColumns(ByVal Str1 As String, ByVal Str2 As String, ByVal Column As Integer) As Integer
   '
   ' Compare items either as integer or string
   '
   If (NumericSort = True) Then
      IMSort_CompareColumns = CInt(Str1) - CInt(Str2)
   Else
      If (Str1 < Str2) Then
         IMSort_CompareColumns = -1
      ElseIf (Str1 > Str2) Then
         IMSort_CompareColumns = 1
      Else
         IMSort_CompareColumns = 0
      End If
   End If
End Function
